home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / clipper / ks94an.zip / FWRITELI.HDR < prev    next >
Text File  |  1994-04-25  |  1KB  |  57 lines

  1. /******************************************************************************
  2.                  The Klipper Library, for CA-Clipper 5.x
  3.         Copyright (c), 1994, Wallace Information Systems Engineering
  4.  
  5. FUNCTION:
  6.  
  7. _FWriteLine( nHandle, cText ) --> nBytesWritten
  8.  
  9. PARAMETERS:
  10.  
  11. nHandle : File handle from previous fopen() or fcreate()
  12. cText   : Text string to write to file
  13.  
  14. SHORT:
  15.  
  16. Write a line of text to an ASCII file.
  17.  
  18. DESCRIPTION:
  19.  
  20. _FWriteLine() writes a line of text to a specified file and appends a
  21. carriage return/line feed pair.
  22.  
  23. nHandle must be a valid file handle from a previous file open or file create.
  24.  
  25. NOTE:
  26.  
  27.  
  28.  
  29. EXAMPLE:
  30.  
  31. #include "fileio.ch"
  32.  
  33. LOCAL nHandle := fcreate('TEST.TXT',FC_NORMAL)
  34.  
  35. if ferror() = 0
  36.  
  37.     _FWriteLine(nFileHandle, 'This is a line')
  38.     _FWriteLine(nFileHandle, 'This is another line')
  39.     _FWriteLine(nFileHandle, 'This is the last line')
  40.  
  41.     fclose(nHandle)
  42. else
  43.     tone(1000)
  44.     ? 'Ooops!'
  45. endif
  46.  
  47. Results:
  48.  
  49.  
  50. TEST.TXT contains (if the write was sucessful):
  51.  
  52. This is a line
  53. This is another line
  54. This is the last line
  55.  
  56. ******************************************************************************/
  57.